Holds all information, and manages the compilation of GPU programs. More...
Public Member Functions | |
| Program () | |
| virtual | ~Program () |
| const ProgramCompilationResult & | getLastCompilationResult () const |
| bool | isFromFile () const |
| bool | isFromMemory () const |
| ProgramSourcesHolder * | getMemory () const |
| const InfiniteByteMask & | getSemantics () const |
| unsigned int | getId () const |
| PROGRAM_TYPE | getType () const |
| PROGRAM_COMPILATION_PROFILE | getProfile () const |
| virtual void | setFromMemory (const ProgramSourcesHolder &memory) |
| void | setFromFiles (const char *folder) |
| void | setId (unsigned int id) |
| void | setProfile (PROGRAM_COMPILATION_PROFILE profile) |
| bool | prepareMemoryWithFiles () |
| virtual bool | loadFromMemory ()=0 |
| virtual bool | tryToLoadFrom (ProgramSourcesHolder &newMemory)=0 |
| virtual bool | load () override |
| virtual void | unload () override |
| virtual void | exportClassToTree (nkExport::Node *rootNode) override |
| virtual void | importClassFromTree (nkExport::Node *rootNode) override |
Public Member Functions inherited from nkGraphics::Resource | |
| Resource () | |
| Resource (const char *path) | |
| virtual | ~Resource () |
| bool | isReadyForRendering () const |
| bool | isUnloaded () const |
| RESOURCE_LOAD_STATE | getLoadState () const |
| std::string_view | getResourcePath () const |
| RESOURCE_TYPE | getResourceTypeName () const |
| std::string_view | getResourceName () const |
| bool | getHidden () const |
| virtual void | setResourcePath (const std::string_view &path) |
| void | setResourceName (const std::string_view &name) |
| void | setHidden (bool value) |
Public Member Functions inherited from nkExport::Exportable | |
| Exportable () | |
| virtual | ~Exportable () |
Holds all information, and manages the compilation of GPU programs.
| nkGraphics::Program::Program | ( | ) |
Constructor. See ShaderManager::createOrRetrieveProgram().
|
virtual |
Destructor.
| const ProgramCompilationResult& nkGraphics::Program::getLastCompilationResult | ( | ) | const |
| bool nkGraphics::Program::isFromFile | ( | ) | const |
| bool nkGraphics::Program::isFromMemory | ( | ) | const |
| ProgramSourcesHolder* nkGraphics::Program::getMemory | ( | ) | const |
| const InfiniteByteMask& nkGraphics::Program::getSemantics | ( | ) | const |
| unsigned int nkGraphics::Program::getId | ( | ) | const |
| PROGRAM_TYPE nkGraphics::Program::getType | ( | ) | const |
| PROGRAM_COMPILATION_PROFILE nkGraphics::Program::getProfile | ( | ) | const |
|
virtual |
Sets the program from an already loaded memory set.
| memory | The memory to use. |
| void nkGraphics::Program::setFromFiles | ( | const char * | folder | ) |
Sets the folder from which the program should load its sources. The files that can be loaded are :
| folder | The path of the folder to load from, relative to the working directory. See nkResources::ResourceManager for the path naming conventions. |
| void nkGraphics::Program::setId | ( | unsigned int | id | ) |
Sets the id of the program.
| id | The id to use. |
| void nkGraphics::Program::setProfile | ( | PROGRAM_COMPILATION_PROFILE | profile | ) |
Sets the profile to use for compilation.
| profile | The profile to use. |
| bool nkGraphics::Program::prepareMemoryWithFiles | ( | ) |
If the program is defined from a folder, prepares the memory with the source files content.
|
pure virtual |
Loads the program, from the memory currently set.
|
pure virtual |
Tries to load from a provided memory, and swap the current state with the newly submitted state only on success. If it fails, the program state is not changed.
| newMemory | The memory to try to load from. |
|
overridevirtual |
Loads and compiles the program.
Implements nkGraphics::Resource.
|
overridevirtual |
Unloads and frees the internal resources of the program.
Implements nkGraphics::Resource.
|
overridevirtual |
Basic exporting capabilities.
| rootNode | The tree to export to. |
Implements nkExport::Exportable.
|
overridevirtual |
Basic importing capabilities.
| rootNode | The tree to import from. |
Implements nkExport::Exportable.